3.359 \(\int \frac{A+B x}{x \sqrt{a+c x^2}} \, dx\)

Optimal. Leaf size=53 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{\sqrt{c}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+c x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]

[Out]

(B*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/Sqrt[c] - (A*ArcTanh[Sqrt[a + c*x^2]/Sq
rt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi [A]  time = 0.111631, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{\sqrt{c}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+c x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/(x*Sqrt[a + c*x^2]),x]

[Out]

(B*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/Sqrt[c] - (A*ArcTanh[Sqrt[a + c*x^2]/Sq
rt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 10.7917, size = 48, normalized size = 0.91 \[ - \frac{A \operatorname{atanh}{\left (\frac{\sqrt{a + c x^{2}}}{\sqrt{a}} \right )}}{\sqrt{a}} + \frac{B \operatorname{atanh}{\left (\frac{\sqrt{c} x}{\sqrt{a + c x^{2}}} \right )}}{\sqrt{c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/x/(c*x**2+a)**(1/2),x)

[Out]

-A*atanh(sqrt(a + c*x**2)/sqrt(a))/sqrt(a) + B*atanh(sqrt(c)*x/sqrt(a + c*x**2))
/sqrt(c)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0600135, size = 67, normalized size = 1.26 \[ -\frac{A \log \left (\sqrt{a} \sqrt{a+c x^2}+a\right )}{\sqrt{a}}+\frac{A \log (x)}{\sqrt{a}}+\frac{B \log \left (\sqrt{c} \sqrt{a+c x^2}+c x\right )}{\sqrt{c}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/(x*Sqrt[a + c*x^2]),x]

[Out]

(A*Log[x])/Sqrt[a] - (A*Log[a + Sqrt[a]*Sqrt[a + c*x^2]])/Sqrt[a] + (B*Log[c*x +
 Sqrt[c]*Sqrt[a + c*x^2]])/Sqrt[c]

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 52, normalized size = 1. \[{B\ln \left ( \sqrt{c}x+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}}-{A\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{c{x}^{2}+a} \right ) } \right ){\frac{1}{\sqrt{a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/x/(c*x^2+a)^(1/2),x)

[Out]

B*ln(c^(1/2)*x+(c*x^2+a)^(1/2))/c^(1/2)-A/a^(1/2)*ln((2*a+2*a^(1/2)*(c*x^2+a)^(1
/2))/x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(c*x^2 + a)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.327463, size = 1, normalized size = 0.02 \[ \left [\frac{B \sqrt{a} \log \left (-2 \, \sqrt{c x^{2} + a} c x -{\left (2 \, c x^{2} + a\right )} \sqrt{c}\right ) + A \sqrt{c} \log \left (-\frac{{\left (c x^{2} + 2 \, a\right )} \sqrt{a} - 2 \, \sqrt{c x^{2} + a} a}{x^{2}}\right )}{2 \, \sqrt{a} \sqrt{c}}, \frac{2 \, B \sqrt{a} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) + A \sqrt{-c} \log \left (-\frac{{\left (c x^{2} + 2 \, a\right )} \sqrt{a} - 2 \, \sqrt{c x^{2} + a} a}{x^{2}}\right )}{2 \, \sqrt{a} \sqrt{-c}}, -\frac{2 \, A \sqrt{c} \arctan \left (\frac{\sqrt{-a}}{\sqrt{c x^{2} + a}}\right ) - B \sqrt{-a} \log \left (-2 \, \sqrt{c x^{2} + a} c x -{\left (2 \, c x^{2} + a\right )} \sqrt{c}\right )}{2 \, \sqrt{-a} \sqrt{c}}, \frac{B \sqrt{-a} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) - A \sqrt{-c} \arctan \left (\frac{\sqrt{-a}}{\sqrt{c x^{2} + a}}\right )}{\sqrt{-a} \sqrt{-c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(c*x^2 + a)*x),x, algorithm="fricas")

[Out]

[1/2*(B*sqrt(a)*log(-2*sqrt(c*x^2 + a)*c*x - (2*c*x^2 + a)*sqrt(c)) + A*sqrt(c)*
log(-((c*x^2 + 2*a)*sqrt(a) - 2*sqrt(c*x^2 + a)*a)/x^2))/(sqrt(a)*sqrt(c)), 1/2*
(2*B*sqrt(a)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) + A*sqrt(-c)*log(-((c*x^2 + 2*a)
*sqrt(a) - 2*sqrt(c*x^2 + a)*a)/x^2))/(sqrt(a)*sqrt(-c)), -1/2*(2*A*sqrt(c)*arct
an(sqrt(-a)/sqrt(c*x^2 + a)) - B*sqrt(-a)*log(-2*sqrt(c*x^2 + a)*c*x - (2*c*x^2
+ a)*sqrt(c)))/(sqrt(-a)*sqrt(c)), (B*sqrt(-a)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)
) - A*sqrt(-c)*arctan(sqrt(-a)/sqrt(c*x^2 + a)))/(sqrt(-a)*sqrt(-c))]

_______________________________________________________________________________________

Sympy [A]  time = 5.0871, size = 99, normalized size = 1.87 \[ - \frac{A \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{c} x} \right )}}{\sqrt{a}} + B \left (\begin{cases} \frac{\sqrt{- \frac{a}{c}} \operatorname{asin}{\left (x \sqrt{- \frac{c}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge c < 0 \\\frac{\sqrt{\frac{a}{c}} \operatorname{asinh}{\left (x \sqrt{\frac{c}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge c > 0 \\\frac{\sqrt{- \frac{a}{c}} \operatorname{acosh}{\left (x \sqrt{- \frac{c}{a}} \right )}}{\sqrt{- a}} & \text{for}\: c > 0 \wedge a < 0 \end{cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/x/(c*x**2+a)**(1/2),x)

[Out]

-A*asinh(sqrt(a)/(sqrt(c)*x))/sqrt(a) + B*Piecewise((sqrt(-a/c)*asin(x*sqrt(-c/a
))/sqrt(a), (a > 0) & (c < 0)), (sqrt(a/c)*asinh(x*sqrt(c/a))/sqrt(a), (a > 0) &
 (c > 0)), (sqrt(-a/c)*acosh(x*sqrt(-c/a))/sqrt(-a), (c > 0) & (a < 0)))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.282776, size = 78, normalized size = 1.47 \[ \frac{2 \, A \arctan \left (-\frac{\sqrt{c} x - \sqrt{c x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - \frac{B{\rm ln}\left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{\sqrt{c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(c*x^2 + a)*x),x, algorithm="giac")

[Out]

2*A*arctan(-(sqrt(c)*x - sqrt(c*x^2 + a))/sqrt(-a))/sqrt(-a) - B*ln(abs(-sqrt(c)
*x + sqrt(c*x^2 + a)))/sqrt(c)